# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1292115016.242065
_template_filename=u'/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/form/fields.html'
_template_uri=u'/derived/form/fields.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = []


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 1
    ns = runtime.Namespace(u'javascriptDefs', context._clean_inheritance_tokens(), templateuri=u'/base/javascriptDefs.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, u'javascriptDefs')] = ns

def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, u'javascriptDefs')._populate(_import_ns, [u'checkForDuplicateTranscriptionScript'])
        checkForDuplicateTranscriptionScript = _import_ns.get('checkForDuplicateTranscriptionScript', context.get('checkForDuplicateTranscriptionScript', UNDEFINED))
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        len = _import_ns.get('len', context.get('len', UNDEFINED))
        range = _import_ns.get('range', context.get('range', UNDEFINED))
        app_globals = _import_ns.get('app_globals', context.get('app_globals', UNDEFINED))
        hasattr = _import_ns.get('hasattr', context.get('hasattr', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n\n')
        # SOURCE LINE 4
        __M_writer(escape(checkForDuplicateTranscriptionScript()))
        __M_writer(u'\n\n<fieldset>\n<legend>Primary Data</legend>\n<ol>\n <li>\n  <label for="transcription">Transcription *\n  <a class="buttonLink helper" ')
        # SOURCE LINE 12
        __M_writer(u'     onclick="addRemoveElement(\'transcriptionKeyboard\', ')
        # SOURCE LINE 13
        __M_writer(u'     \'transriptionKeyboardButton\', \'the keyboard\', \'k-|k+\');" ')
        # SOURCE LINE 14
        __M_writer(u'     title="view keyboard" id="transriptionKeyboardButton">k+</a>\n  </label><br />\n  ')
        # SOURCE LINE 16
        __M_writer(escape(h.select(name='grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=1)))
        __M_writer(u'\n  <input id="transcription" maxlength="255" name="transcription" tabindex="1"\n         type="text" onblur="checkForDuplicateTranscription();" />\n  <div id=\'duplicateWarningDiv\' class=\'invisiDiv\'></div>\n  <div id=\'transcriptionKeyboard\' class=\'invisiDiv\'>')
        # SOURCE LINE 20
        __M_writer(escape(c.transcriptionKeyboardTable))
        __M_writer(u'</div>\n </li>\n <li>\n  <label for="morphemeBreak">Morpheme Break\n  <a class="buttonLink helper" ')
        # SOURCE LINE 25
        __M_writer(u'     onclick="addRemoveElement(\'morphemeBreakKeyboard\', ')
        # SOURCE LINE 26
        __M_writer(u'     \'morphemeBreakKeyboardButton\', \'the keyboard\', \'k-|k+\');" ')
        # SOURCE LINE 27
        __M_writer(u'     title="view keyboard" id="morphemeBreakKeyboardButton">k+</a>\n  </label><br />\n  <input id="morphemeBreak" maxlength="255" name="morphemeBreak" tabindex="2" type="text" />\n  <div id=\'morphemeBreakKeyboard\' class=\'invisiDiv\'>')
        # SOURCE LINE 30
        __M_writer(escape(c.morphemeBreakKeyboardTable))
        __M_writer(u'</div>\n </li>\n <li>\n  <label for="morphemeGloss">Morpheme Gloss</label><br />\n  <input id="morphemeGloss" maxlength="255" name="morphemeGloss" tabindex="3" type="text" />\n </li>\n <li>\n  <label for="glosses-0">Gloss *</label><br />\n  ')
        # SOURCE LINE 38
        __M_writer(escape(h.select(name='glosses-0.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=4)))
        __M_writer(u'\n  <input class="gloss" id="glosses-0.gloss" maxlength="255" name="glosses-0.gloss" tabindex="4" type="text" />\n  <input type="hidden" id="glosses-0.ID" name="glosses-0.ID" />\n')
        # SOURCE LINE 41
        if hasattr(c, 'viewExtraGlossesFields') and c.viewExtraGlossesFields:
            # SOURCE LINE 42
            __M_writer(u'  <a class="buttonLink" id="addRemoveGloss1Button" tabindex=4 onclick="addRemoveElement(\'extraGlosses\',\'addRemoveGloss1Button\', \'extra gloss fields\')" title="hide extra gloss fields">-</a>\n </li>\n <div id="extraGlosses" style="display:block;visibility:visible;">\n')
            # SOURCE LINE 45
        else:
            # SOURCE LINE 46
            __M_writer(u'  <a class="buttonLink" id="addRemoveGloss1Button" tabindex=4 onclick="addRemoveElement(\'extraGlosses\',\'addRemoveGloss1Button\', \'extra gloss fields\')" title="show extra gloss fields">+</a>\n </li>\n <div id="extraGlosses">\n')
            pass
        # SOURCE LINE 50
        __M_writer(u' <li id="gloss1ListItem">\n  <label for="glosses-1">Gloss</label><br />\n  ')
        # SOURCE LINE 52
        __M_writer(escape(h.select(name='glosses-1.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)))
        __M_writer(u'\n  <input class="gloss" id="glosses-1.gloss" maxlength="255" name="glosses-1.gloss" tabindex="5" type="text" />\n  <input type="hidden" id="glosses-1.ID" name="glosses-1.ID" />\n </li>\n <li id="gloss2ListItem">\n  <label for="glosses-2">Gloss</label><br />\n  ')
        # SOURCE LINE 58
        __M_writer(escape(h.select(name='glosses-2.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)))
        __M_writer(u'\n  <input class="gloss" id="glosses-2.gloss" maxlength="255" name="glosses-2.gloss" tabindex="5" type="text" />\n  <input type="hidden" id="glosses-2.ID" name="glosses-2.ID" />\n </li>\n <li id="gloss3ListItem">\n  <label for="glosses-3">Gloss</label><br />\n  ')
        # SOURCE LINE 64
        __M_writer(escape(h.select(name='glosses-3.grammaticality', selected_values="", options=app_globals.grammaticalities, tabindex=5)))
        __M_writer(u'\n  <input class="gloss" id="glosses-3.gloss" maxlength="255" name="glosses-3.gloss" tabindex="5" type="text" />\n  <input type="hidden" id="glosses-3.ID" name="glosses-3.ID" />\n </li>\n </div>\n</ol> \n</fieldset>\n<fieldset>\n<legend>Secondary Data</legend>\n<ol>\n <li>\n  <label for="comments">General Comments</label><br />\n  <textarea id="comments" name="comments" rows="2" cols="10" tabindex="5"></textarea>\n </li>\n <li>\n  <label for="speakerComments">Speaker Comments</label><br />\n  <textarea id="speakerComments" name="speakerComments" rows="2" cols="10" tabindex="6"></textarea>\n </li>\n <li>\n  <label for="elicitationMethod">Elicitation Method</label>\n  ')
        # SOURCE LINE 84
        elicitationMethods = [('', '')] + app_globals.elicitationMethods 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['elicitationMethods'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n  ')
        # SOURCE LINE 85
        __M_writer(escape(h.select(name='elicitationMethod', selected_values="", options=elicitationMethods, tabindex=7)))
        __M_writer(u'\n </li>\n <li>\n  <label for="keywords_list">Keywords</label>\n  <ul id="keywords_list" class="checklist">\n')
        # SOURCE LINE 90
        for i in range(len(app_globals.keywords)): 
            # SOURCE LINE 91
            __M_writer(u"   <li>\n    <label for='")
            # SOURCE LINE 92
            __M_writer(escape("keywords-%s.keyword"%(app_globals.keywords[i][0])))
            __M_writer(u"'><input id='")
            __M_writer(escape("keywords-%s.keyword"%(app_globals.keywords[i][0])))
            __M_writer(u"' name='")
            __M_writer(escape("keywords-%s.keyword"%(app_globals.keywords[i][0])))
            __M_writer(u'\' type="checkbox" value="')
            __M_writer(escape(app_globals.keywords[i][0]))
            __M_writer(u'" tabindex="8"/> ')
            __M_writer(escape(app_globals.keywords[i][1]))
            __M_writer(u'</label>\n   </li>\n')
            pass
        # SOURCE LINE 95
        __M_writer(u'  </ul>\n </li>\n <li>\n  <label for="syntacticCategory">Category</label>\n  ')
        # SOURCE LINE 99
        syncats = [('', '')] + app_globals.syncats 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['syncats'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n  ')
        # SOURCE LINE 100
        __M_writer(escape(h.select(name='syntacticCategory', selected_values="", options=syncats, tabindex=9)))
        __M_writer(u'\n </li>\n</ol>\n</fieldset>\n<fieldset>\n<legend>Who and When</legend>\n<ol>\n <li>\n  <label for="speaker">Speaker</label>\n  ')
        # SOURCE LINE 109
        speakers = [('', '')] + app_globals.speakers 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['speakers'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n  ')
        # SOURCE LINE 110
        __M_writer(escape(h.select(name='speaker', selected_values="", options=speakers, tabindex=10)))
        __M_writer(u'\n </li>\n <li>\n  <label for="elicitor">Elicitor</label>\n  ')
        # SOURCE LINE 114
        users = [('', '')] + app_globals.users 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['users'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n  ')
        # SOURCE LINE 115
        __M_writer(escape(h.select(name='elicitor', selected_values="", options=users, tabindex=11)))
        __M_writer(u'\n </li>\n <li>\n  <label for="verifier">Verifier</label>\n  ')
        # SOURCE LINE 119
        __M_writer(escape(h.select(name='verifier', selected_values="", options=users, tabindex=12)))
        __M_writer(u'\n </li>\n <li>\n  <label for="source">Source</label>\n  ')
        # SOURCE LINE 123
        sources = [('', '')] + app_globals.sources 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['sources'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n  ')
        # SOURCE LINE 124
        __M_writer(escape(h.select(name='source', selected_values="", options=sources, tabindex=13)))
        __M_writer(u'\n </li>\n <li>\n  <label for="dateElicited">Date Elicited (MM/DD/YYYY)</label>\n  <input id="dateElicited" maxlength="10" name="dateElicited" tabindex="14" type="text" />\n </li>\n</ol>\n</fieldset>\n\n\n\n\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


